Ternary content addressable memory (TCAM) devices are often used to support packet forwarding and classification operations in network switches and routers. A TCAM device can be instructed to compare a search value, typically formed from one or more fields within the header of an incoming packet, with entries within an associative storage array of the TCAM device. If the search value matches an entry, the TCAM device generates an index that corresponds to the location of the matching entry within a storage array, and asserts a match flag to signal the match. The storage array addressed by the index may be either within or separate from the TCAM device. The entry retrieved from the storage array includes, for example, routing or classification information for the packet.
A TCAM is typically organized as an array with multiple TCAM rows, where each row comprises multiple TCAM cells. When a search value is searched for in the TCAM it is simultaneously compared against all the values stored in the different rows. When all the TCAM cells in a row matches the search value, a row match signal for the row is generated. All match signals are connected to a match logic block. The match logic block generates a match address that corresponds to the match signal of the row.
A TCAM cell is typically implemented using two SRAM cells and comparison logic. The first SRAM cell contains a data bit and the second SRAM cell contains a mask bit. Each SRAM cell requires 6 transistors. The comparison logic requires 4 transistors. All together a TCAM cell requires 16 transistors to store one bit of data, which results in large die area per storage bit.
When a value is searched for in a TCAM device, all compare logic transistors in all TCAM cells are activated. This results in a large amount of required power and heat dissipation.